Skip to content

[1주차] 김지훈/[feat] 초기 프로젝트 설정#2

Merged
jihoonkim501 merged 12 commits intoLeets-Official:김지훈/mainfrom
jihoonkim501:김지훈/1주차
Mar 27, 2026

Hidden character warning

The head ref may contain hidden characters: "\uae40\uc9c0\ud6c8/1\uc8fc\ucc28"
Merged

[1주차] 김지훈/[feat] 초기 프로젝트 설정#2
jihoonkim501 merged 12 commits intoLeets-Official:김지훈/mainfrom
jihoonkim501:김지훈/1주차

Conversation

@jihoonkim501
Copy link

@jihoonkim501 jihoonkim501 commented Mar 20, 2026

1. 과제 요구사항 중 구현한 내용

  • 프로젝트 구조 구성 (Controller/Service 레이어 분리)
  • 헬스체크 API 구현 (GET /health)
  • 문자열 2개 반환 API 구현 (POST /string/repeat)
  • Validation 추가 ( 문자열 NotNull )

2. 핵심 변경 사항

프로젝트 기본 파일 세팅과 헬스 체크 API , 문자열 2개반환 API 구현하였고
API endpoint를 /api/test/health , /api/test/repeat 형식으로 경로를 통일시켜 가독성을 향상시켰습니다.
예외처리를 DTO 단에서 Validation으로 null 예외처리를 하였습니다.
추가적으로 코드리뷰어를 자동지정하여 PR 생성시 자동선택되도록 구성하였습니다.

3. 실행 및 검증 결과

  • health check
image
  • 문자열 출력 request
image
  • 문자열 출력 response
image
  • 실행 결과:
  • GET /api/test/health 응답:
{
  "isSuccess": true,
  "code": "TEST_200",
  "message": "OK"
}
  • POST /api/test/repeat 요청/응답:
{
  "isSuccess": true,
  "code": "TEST_201",
  "message": "문자열을 성공적으로 출력했습니다.",
  "data": {
    "string_one": "hello",
    "string_two": "hello"
  }
}
  • POST /api/test/repeat , value = Null 일때 응답
{
  "isSuccess": false,
  "code": "COMM_400",
  "message": "value는 필수입니다"
}

4. 완료 사항

  1. 요청/응답 DTO 분리하기
  2. 잘못된 요청에 대한 예외 처리 고민해보기
  3. 응답 메시지를 직접 변경해보기
  4. API 경로를 본인이 이해하기 쉬운 구조로 설계해보기
  5. Controller 레이어와 Service 레이어를 분리

5. 추가 사항

제출 체크리스트

  • PR 제목이 규칙에 맞다
  • base가 {이름}/main 브랜치다
  • compare가 {이름}/{숫자}주차 브랜치다
  • 프로젝트가 정상 실행된다
  • 본인을 Assignee로 지정했다
  • 파트 담당 Reviewer를 지정했다
  • 리뷰 피드백을 반영한 뒤 머지/PR close를 진행한다

Reviewer 참고

빼먹은게 있다면 리뷰 달아주세요~!

@jihoonkim501 jihoonkim501 self-assigned this Mar 20, 2026
@jihoonkim501 jihoonkim501 added the enhancement New feature or request label Mar 20, 2026
@eun-seoo
Copy link
Member

지훈님, 제일 먼저 과제를 제출해주셨네요!! 고생 많으셨습니다 👍🏻👍🏻
3. 실행 및 검증 결과는 스크린샷으로 첨부해주시면 감사하겠습니다 😊

@jihoonkim501
Copy link
Author

지훈님, 제일 먼저 과제를 제출해주셨네요!! 고생 많으셨습니다 👍🏻👍🏻 3. 실행 및 검증 결과는 스크린샷으로 첨부해주시면 감사하겠습니다 😊

넵 수정하였습니다! 감사합니다~!

public enum ErrorStatus implements BaseStatus {

// 예시
COMM_ERROR_STATUS(HttpStatus.BAD_REQUEST, "COMM_400", "잘못된 요청입니다."),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMM_ERROR_STATUS가 현재 코드에서 사용되지 않는 값으로 보이는데 아래 BAD_REQUEST와도 동일한 코드/메시지를 가지고 있어서 혼동될 수 있을 것 같습니다 🥲
불필요하다면 제거해도 좋을 것 같아요!!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 예시로 추가하고 수정한다는게 까먹었네요..! 다음 작업때 수정하도록 하겠습니다 감사합니다~!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

성공이랑 에러를 BaseStatus로 묶어서 ApiResponse에서 동일한 방식으로 처리하신 부분이 깔끔하네요!! 👍

Copy link

@Hanharam Hanharam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Query, Command 분리하신 부분,ResponseEntityExceptionHandler 상속받아서 예외핸들러 작성하신 부분 좋았습니다!


// test
HEALTH_CHECK_SUCCESS_STATUS(HttpStatus.OK,"TEST_200","OK"),
STRING_REPEAT_SUCCESS(HttpStatus.CREATED,"TEST_201","문자열을 성공적으로 출력했습니다.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 성공을 다양하게 정의하는 것은 너무나도 좋다고 생각합니다.

사실 이번 주차에 할 피드백은 아닌 것 같긴하지만...

다만, 다음의 내용은 한 번 생각해보면 좋을 것 같아요.

  1. api가 의미하는 성공이 명확한가?
  2. ok 이외의 디스크립션은 정말로 필요한게 맞는가? 성공이 명확하면 필요없지 않나?
  3. 성공이 여러가지인 api도 필요한가?
  4. 디스크립션이 자세하면 생기는 장점과 단점은 무엇인가?

등등 같은 내용도 생각해보면 재미있을 것 같습니다.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 고민해보고 따로 정리해보겠습니다~! 리뷰 감사합니다 👍 👍

Copy link

@N-yujeong N-yujeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 전체적으로 과제 요구사항을 잘 반영하여 구현하신 것 같습니다.

특히 ApiResponse와 BaseStatus를 활용해 응답 구조를 일관되게 관리하신 점이 인상적이었습니다.

@jihoonkim501 jihoonkim501 merged commit 442bc64 into Leets-Official:김지훈/main Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants